import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import make_interp_spline

file_path = 'loss_record.txt' 

with open(file_path, 'r') as file:
    data = list(map(float, file.read().split()))

x = np.arange(len(data))

plt.figure(figsize=(8, 6))
plt.plot(x, data, label='Line Plot', color='b')
plt.scatter(x, data, color='red', label='Data Points') 
plt.title('Loss Trend')
plt.xlabel('Epoch')
plt.ylabel('Loss Value')
plt.legend()
plt.grid(True)

plt.show()
